#include <stdio.h>

#include "crc_8.h"
#include "crc_16.h"
#include "size.h"
#include "crc_32.h"
#include "byteutils.h"
int main() {
    char a[] = {0x4A, 0x22, 0x11, 0xEE};

    //============CRC-8========================
    uint8_t crc_8=crc8(a,4);
    printf("crc_8=%X\n", crc_8);

    uint8_t ITU=crc8_ITU(a,4);
    printf("ITU=%X\n", ITU);

    uint8_t ROCH= crc8_ROHC(a, 4);
    printf("ROCH=%X\n", ROCH);

    uint8_t MAXIM=crc8_MAXIM(a,4);
    printf("MAXIM=%X\n", MAXIM);
    //============CRC-16========================
    uint16_t IBM = crc16_IBM(a, 4);
    printf("IBM=%X\n", IBM);
    uint16_t MAXIM_16 = crc16_MAXIM(a, 4);
    printf("MAXIM_16=%X\n", MAXIM_16);
    uint16_t USB = crc16_USB(a, 4);
    printf("USB=%X\n", USB);
    uint16_t MODBUS = crc16_MODBUS(a, 4);
    printf("MODBUS=%X\n", MODBUS);
    uint16_t CCITT = crc16_CCITT(a, 4);
    printf("CCITT=%X\n", CCITT);
    uint16_t x25 = crc16_X25(a, 4);
    printf("x25=%X\n", x25);
    uint16_t XMODEM = crc16_XMODEM(a, 4);
    printf("XMODEM=%X\n", XMODEM);
    uint16_t CCITT_FALSE = crc16_CCITT_FALSE(a, 4);
    printf("CCITT_FALSE=%X\n", CCITT_FALSE);
    uint16_t DNP = crc16_DNP(a, 4);
    printf("DNP=%X\n", DNP);

    //============CRC-32========================
    uint32_t crc_32=crc32(a,4);
    printf("crc_32=%X\n", crc_32);

    uint32_t MPEG2=crc32_MPEG2(a,4);
    printf("MPEG2=%X\n", MPEG2);
    return 0;
}
